<?php
require "./model/class_Login.php";

		$obj = new Login();
		$auth=$obj->isAuth();
		
		if ($auth){
			header ("Location: ./view/adm_panel.php");
			exit;
		}
		
		if (isset($_POST['sub'])){
			$login_success = $obj->login($_POST['login'], $_POST['pass']);
			if($login_success){
				header ("Location: ./view/adm_panel.php");
				exit;
			}
		}
?>